package utils;

public class Coordinates {
    private double x, y, z;

    public Coordinates(Coordinates vec) {
	this(vec.getX(), vec.getY(), vec.getZ());
    }

    public Coordinates(double[] cords) {
	this(cords[0], cords[1], cords[2]);
    }

    public Coordinates(double x, double y, double z) {
	this.x = x;
	this.y = y;
	this.z = z;
    }

    public String toString() {
	return String.format("%f,%f,%f", x, y, z);

    }

    public void deepCopy(Coordinates vec) {
	double[] arr = { vec.x, vec.y, vec.z };
	deepCopy(arr);
    }

    public void deepCopy(double[] vec) {
	x = vec[0];
	y = vec[1];
	z = vec[2];
    }

    public double getX() {
	return x;
    }

    public double getY() {
	return y;
    }

    public double getZ() {
	return z;
    }
}
